﻿

--获取员工工资
CREATE proc [dbo].[proc_Employee_Wage_GetList_Count]
(
		@CompanyId int,
		@DepId int,
		@Stext nvarchar(50)

)
as
begin

	Declare @bmbh_T  varchar(30)
	Select @bmbh_T=bmbh From department Where id=@DepId
	
	Select count(id) from employee
	Where (@CompanyId=0 Or CompanyId=@CompanyId)
		and (@DepId=0 Or DepartmentId in(Select Id From department Where Left(bmbh,Len(@bmbh_T))=@bmbh_T))
		and (@Stext='' Or Ename like '%'+@Stext+'%')
		and State <> 5
	

end
	RETURN


